import schedule from 'node-schedule'
import request from 'request'
import config from './config.js'

schedule.scheduleJob('*/5 * * * * *', () => {
  console.log('定时任务执行了');
  request(config.check_url, {
    method: "POST",
    headers: {
      cookie: config.cookie,
      Referer: config.url
    }
  },function (error, response, body) {
    console.log(body);
  })
})

// schedule.cancelJob()